package enterprise.manage.service.impl;

import enterprise.manage.dao.sp.GetSysNoProcedure;
import enterprise.manage.service.SysNoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User:zhenmingyue
 * Date: 2012-12-20
 * Desc:
 */
@Service("SysNoService")
@Transactional
public class SysNoServiceImpl implements SysNoService {
    @Autowired
    private GetSysNoProcedure getSysNoProcedure;
    @Override
    public String getNo(String type) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("type", type);
        Map resultMap = getSysNoProcedure.execute(paramMap);
        return resultMap.get("no").toString();
    }
}
